<div class="bg-light lter b-b wrapper-md">
    <h4 class="m-n font-thin">我的收入</h4>
    <button ui-sref="app.property" class="btn-back btn btn-dark btn-sm btn-rounded">
        返回
    </button>
</div>
<div class="wrapper-md ng-scope" >
    <div class="panel panel-default" ng-controller="withdrawCtrl">
        <div class="panel-heading font-bold">
            余额提现
        </div>
        <div class="panel-body">
            <form name="withdrawInfo" class="form-horizontal form-validation" method="post">
                <div class="form-group">
                    <label class="col-sm-2 control-label font-bold">申请人</label>
                    <div class="col-sm-5">
                        <input ng-model="withdraw.proposer" name="person" type="text" placeholder="请填写持卡人姓名" class="form-control" required>
                    </div>
                    <div class="m-t-xs" ng-if="withdrawInfo.person.$touched">
                        <span class="text-danger m-l-sm h6" ng-if="withdrawInfo.person.$error.required">申请人姓名不允许为空</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label font-bold">联系电话</label>
                    <div class="col-sm-5">
                        <input type="text" name="phone" class="form-control" placeholder="请填写准确的电话号码" ng-model="withdraw.mobilePhone" required>
                    </div>
                    <div class="m-t-xs" ng-if="withdrawInfo.phone.$touched">
                        <span class="text-danger m-l-sm h6" ng-if="withdrawInfo.phone.$error.required">联系电话不允许为空</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label font-bold">提现金额</label>
                    <div class="col-sm-5">
                        <input name="money" ng-model="withdraw.withdrawalMoney" type="number" min="0.01" placeholder="请注意提现金额在可用余额范围内"
                               max="{{max}}" class="form-control" ng-pattern="/^[0-9]+(.[0-9]{1,2})?$/" required>
                    </div>
                    <div class="m-t-xs" ng-if="withdrawInfo.money.$touched">
                        <span class="text-danger m-l-sm h6" ng-if="withdrawInfo.money.$error.required">提现金额不允许为空</span>
                        <span class="text-danger m-l-sm h6" ng-if="withdrawInfo.money.$error.min">提现金额不得低于最小值</span>
                        <span class="text-danger m-l-sm h6" ng-if="withdrawInfo.money.$error.max">提现金额不得高于最大值</span>
                        <span class="text-danger m-l-sm h6" ng-if="withdrawInfo.money.$error.pattern">提现金额最多保留两位小数</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label font-bold">到账银行</label>
                    <div class="col-sm-5">
                        <select class="form-control" name="bankCard" ng-model="withdraw.bankId" required>
                            <option value="">请选择银行卡</option>
                            <option ng-repeat="b in bank" value="{{b.id}}" ng-if="b.status == 0">{{b.companyName}}：{{b.bankCard}}</option>
                            <option ng-repeat="b in bank" value="{{b.id}}" ng-if="b.status == 1">{{b.bank}}({{b.bankType}})：{{b.bankCard}}</option>
                        </select>
                    </div>
                    <div class="m-t-xs" ng-if="withdrawInfo.bankCard.$touched">
                        <span class="text-danger m-l-sm h6" ng-if="withdrawInfo.bankCard.$error.required">请选择到账银行</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label font-bold">备注</label>
                    <div class="col-sm-5">
                        <textarea rows="6" name="remark" class="form-control h6" ng-model="withdraw.remark"></textarea>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <a type="submit" class="btn btn-success" ng-disabled="withdrawInfo.$invalid" ng-click="openAdd()" target="_blank">提现</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>